Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Keith Jackson 183 posts 552 karma points
    Jan 14, 2015 @ 14:59
    Keith Jackson
    0

    Node Template Dropdown shows [Object object] and cannot retrigger install to fix

    The accepted fix for this problem is to remove the value from web.config for...

    <add key="umbracoConfigurationStatus" value="7.2.1" />
    

    making it...

    <add key="umbracoConfigurationStatus" value="" />
    

    Which should then trigger the install again. This doesn't work for me on 7.2.1 so I can't execute the fix. Looking at Chrome I get...

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) on Install/api/GetSetup

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Jan 14, 2015 @ 15:04
    Lee Kelleher
    0

    Hi Keith,

    Not sure if something got stripped out from your original post?

    Setting the umbracoConfigurationStatus to blank/empty should retrigger the installer process.

    Re: the 500 error, are there any exception details in your /App_Data/Logs/UmbracoTraceLog.txt?

    Thanks,
    - Lee

  • Keith Jackson 183 posts 552 karma points
    Jan 14, 2015 @ 15:20
    Keith Jackson
    0

    Hi Lee,

    Yeah It did - My config XML samples got stripped. That's what I've been doing but the install screen just hangs and fails to load.

    Here's my log dump...

    2015-01-14 14:08:21,786 [36] INFO umbraco.BusinessLogic.Log - [Thread 6] Log scrubbed. Removed all items older than 2014-11-15 14:08:21 2015-01-14 14:09:48,195 [36] INFO umbraco.BusinessLogic.Log - [Thread 20] Log scrubbed. Removed all items older than 2014-11-15 14:09:48 2015-01-14 14:11:14,599 [36] INFO umbraco.BusinessLogic.Log - [Thread 20] Log scrubbed. Removed all items older than 2014-11-15 14:11:14 2015-01-14 14:12:41,011 [36] INFO umbraco.BusinessLogic.Log - [Thread 20] Log scrubbed. Removed all items older than 2014-11-15 14:12:41 2015-01-14 14:14:07,427 [36] INFO umbraco.BusinessLogic.Log - [Thread 71] Log scrubbed. Removed all items older than 2014-11-15 14:14:07 2015-01-14 14:15:33,831 [36] INFO umbraco.BusinessLogic.Log - [Thread 77] Log scrubbed. Removed all items older than 2014-11-15 14:15:33 2015-01-14 14:17:00,243 [36] INFO umbraco.BusinessLogic.Log - [Thread 76] Log scrubbed. Removed all items older than 2014-11-15 14:17:00 2015-01-14 14:18:26,650 [36] INFO umbraco.BusinessLogic.Log - [Thread 21] Log scrubbed. Removed all items older than 2014-11-15 14:18:26 2015-01-14 14:19:17,790 [36] INFO Umbraco.Core.UmbracoApplicationBase - [Thread 91] Application shutdown. Reason: ConfigurationChange 2015-01-14 14:19:24,374 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Determining hash of code files on disk 2015-01-14 14:19:24,386 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Hash determined (took 5ms) 2015-01-14 14:19:24,395 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of umbraco.interfaces.IApplicationStartupHandler 2015-01-14 14:19:24,420 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of umbraco.interfaces.IApplicationStartupHandler, found 37 (took 23ms) 2015-01-14 14:19:24,503 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter 2015-01-14 14:19:24,504 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter, found 0 (took 1ms) 2015-01-14 14:19:24,505 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Core.PropertyEditors.IPropertyValueConverter 2015-01-14 14:19:24,505 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Core.PropertyEditors.IPropertyValueConverter, found 16 (took 0ms) 2015-01-14 14:19:24,522 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Web.Mvc.SurfaceController 2015-01-14 14:19:24,523 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Web.Mvc.SurfaceController, found 4 (took 0ms) 2015-01-14 14:19:24,523 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Web.WebApi.UmbracoApiController 2015-01-14 14:19:24,525 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Web.WebApi.UmbracoApiController, found 35 (took 1ms) 2015-01-14 14:19:24,564 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Core.Media.IThumbnailProvider 2015-01-14 14:19:24,564 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Core.Media.IThumbnailProvider, found 3 (took 0ms) 2015-01-14 14:19:24,565 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Core.Media.IImageUrlProvider 2015-01-14 14:19:24,565 [81] INFO Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Core.Media.IImageUrlProvider, found 1 (took 0ms) 2015-01-14 14:19:25,189 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,189 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,200 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,201 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,261 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,262 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,263 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,324 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,325 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,334 [81] INFO Umbraco.Core.ApplicationContext - [Thread 83] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,721 [81] INFO Umbraco.Web.UmbracoModule - [Thread 93] Setting OriginalRequestUrl: dev.ministryotech.local:80/umbraco 2015-01-14 14:19:25,794 [81] INFO Umbraco.Core.ApplicationContext - [Thread 93] CurrentVersion different from configStatus: '7.2.1','' 2015-01-14 14:19:25,795 [81] WARN Umbraco.Web.UmbracoModule - [Thread 93] Umbraco is not configured 2015-01-14 14:19:25,861 [81] INFO Umbraco.Core.ApplicationContext - [Thread 66] CurrentVersion different from configStatus: '7.2.1',''

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Jan 14, 2015 @ 15:26
    Lee Kelleher
    0

    Hmmm, no errors or anything suspect in the log ... apart from the gazillion "CurrentVersion different from configStatus: '7.2.1'" info messages!

    I'm curious about the cause of the 500 error in '/Install/api/GetSetup' - are you able to view the response in Chrome dev-tools?

  • Keith Jackson 183 posts 552 karma points
    Jan 14, 2015 @ 15:31
    Keith Jackson
    0

    Not much other than it's quick and comes from a call in angular.min.js

    Here's a grab...

    enter image description here

  • Keith Jackson 183 posts 552 karma points
    Jan 14, 2015 @ 15:32
    Keith Jackson
    1

    Just realised it's like a room full of over exuberant testers delighted to have found yet another bug!

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Jan 14, 2015 @ 15:35
    Lee Kelleher
    0

    If you click on the "GetStatus" request (row), it should give you the Headers and Response. It'll probably the generic 500 error page, but there's a chance it might give the actual exception.

    Might also be worth enabling debug mode in Web.config (if you haven't already?)

  • Keith Jackson 183 posts 552 karma points
    Jan 14, 2015 @ 15:39
    Keith Jackson
    0

    Ah-Ha! Learn something new...

    {"Message":"An error has occurred.","ExceptionMessage":"No constructors on type 'Umbraco.Web.Install.Controllers.InstallApiController' can be found with the constructor finder 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder'.","ExceptionType":"Autofac.Core.DependencyResolutionException","StackTrace":"   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)\r\n   at Autofac.Core.Resolving.InstanceLookup.Execute()\r\n   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)\r\n   at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)\r\n   at Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters)\r\n   at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.GetInstanceOrActivator(HttpRequestMessage request, Type controllerType, Func`1& activator)\r\n   at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)"}
    

    This may make some sense. I'm using Autofac myself. My setup is as follows...

        public static class IocConfig
    {
        private static AutofacWebApiDependencyResolver _apiResolver;
        private static AutofacDependencyResolver _mvcResolver;
    
        /// <summary>
        /// Gets the IoC Dependency Resolver.
        /// </summary>
        public static AutofacWebApiDependencyResolver ApiResolver
        {
            get { return _apiResolver ?? (_apiResolver = new AutofacWebApiDependencyResolver(BuildContainer())); }
        }
    
        /// <summary>
        /// Gets the IoC Dependency Resolver.
        /// </summary>
        public static AutofacDependencyResolver MvcResolver
        {
            get { return _mvcResolver ?? (_mvcResolver = new AutofacDependencyResolver(BuildContainer())); }
        }
    
        #region | Private Methods |
    
        /// <summary>
        /// Builds the IoC container.
        /// </summary>
        private static IContainer BuildContainer()
        {
            var builder = new ContainerBuilder();
    
            //register all controllers found in the Ministry.Ministryweb assembly
            builder.RegisterControllers(typeof(MinistrywebSite).Assembly);
    
            // Register umbraco context, mvc controllers and api controllers
            builder.Register(c => UmbracoContext.Current).AsSelf();
            builder.RegisterControllers(typeof(MinistrywebSite).Assembly);
            builder.RegisterControllers(Assembly.GetExecutingAssembly());
            builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
            builder.RegisterApiControllers(typeof(MinistrywebApplication).Assembly);
            builder.RegisterControllers(Assembly.GetExecutingAssembly());
    
            //add custom class to the container as Transient instance
            builder.RegisterType<ConfigReader>().As<IConfigReader>();
            builder.RegisterType<WebSession>().As<IWebSession>();
            builder.RegisterType<BlogInfoBuilder>().As<IBlogInfoBuilder>();
    
            builder.RegisterModule(new AutofacWebTypesModule());
    
            return builder.Build();
        }
    
        #endregion
    }
    
  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Jan 14, 2015 @ 15:48
    Lee Kelleher
    0

    I'm not expect with using IoC (or Autofac) with Umbraco, so not sure what to suggest at the moment.

    I did find some other people who have experienced the same issue:

    I'll send out a tweet to see if anyone else might know how to resolve it.

    Cheers,
    - Lee

  • Keith Jackson 183 posts 552 karma points
    Jan 14, 2015 @ 15:53
    Keith Jackson
    0

    I reckon the first of those links - http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/49719-Umbraco-710-upgrade-issue-with-dependency-injection is bang on.

    I'll have a quick play and see how far I get after Lunch!

  • Mads Krohn 211 posts 504 karma points c-trib
    Jan 14, 2015 @ 16:24
    Mads Krohn
    0

    Looking at the code you provided, it seems you might have a copy paste error

    // Register umbraco context, mvc controllers and api controllers
    builder.Register(c => UmbracoContext.Current).AsSelf();
    builder.RegisterControllers(typeof(MinistrywebSite).Assembly);
    builder.RegisterControllers(Assembly.GetExecutingAssembly());
    builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
    builder.RegisterApiControllers(typeof(MinistrywebApplication).Assembly);
    builder.RegisterControllers(Assembly.GetExecutingAssembly()); 
    

    The last line should probably be changed to builder.RegisterApiControllers(Assembly.GetExecutingAssembly());

    Also, I'm a little bit puzzled as to why you would register everything twice?

  • Keith Jackson 183 posts 552 karma points
    Jan 14, 2015 @ 17:40
    Keith Jackson
    0

    Hi Mads,

    Good spot - This was wrong and should probably be like this...

            // Register umbraco context, mvc controllers and api controllers
            builder.Register(c => UmbracoContext.Current).AsSelf();
            builder.RegisterControllers(typeof(UmbracoApplication).Assembly);
            builder.RegisterControllers(typeof(MinistrywebSite).Assembly);
            builder.RegisterControllers(Assembly.GetExecutingAssembly());
            builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
            builder.RegisterApiControllers(typeof(MinistrywebApplication).Assembly);
            builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
    

    I'm not sure what you mean about registering everything twice though. I'm registering both the Api based controllers and the standard Mvc ones. I may be better off with a separate container for each though. IoC in Umbraco throws my head through a loop. To give some context, my whole IoCConfig looks like this (updated from typo)...

    using Autofac;
    using Autofac.Integration.Mvc;
    using Autofac.Integration.WebApi;
    using Ministry.Ministryweb.Factories;
    using System.Reflection;
    using Umbraco.Web;
    
    namespace Ministry.Ministryweb
    {
        public static class IocConfig
        {
            private static AutofacWebApiDependencyResolver _apiResolver;
            private static AutofacDependencyResolver _mvcResolver;
    
            /// <summary>
            /// Gets the IoC Dependency Resolver.
            /// </summary>
            public static AutofacWebApiDependencyResolver ApiResolver
            {
                get { return _apiResolver ?? (_apiResolver = new AutofacWebApiDependencyResolver(BuildContainer())); }
            }
    
            /// <summary>
            /// Gets the IoC Dependency Resolver.
            /// </summary>
            public static AutofacDependencyResolver MvcResolver
            {
                get { return _mvcResolver ?? (_mvcResolver = new AutofacDependencyResolver(BuildContainer())); }
            }
    
            #region | Private Methods |
    
            /// <summary>
            /// Builds the IoC container.
            /// </summary>
            private static IContainer BuildContainer()
            {
                var builder = new ContainerBuilder();
    
                //register all controllers found in the Ministry.Ministryweb assembly
                builder.RegisterControllers(typeof(MinistrywebSite).Assembly);
    
                // Register umbraco context, mvc controllers and api controllers
                builder.Register(c => UmbracoContext.Current).AsSelf();
                builder.RegisterControllers(typeof(UmbracoApplication).Assembly);
                builder.RegisterControllers(typeof(MinistrywebSite).Assembly);
                builder.RegisterControllers(Assembly.GetExecutingAssembly());
                builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
                builder.RegisterApiControllers(typeof(MinistrywebApplication).Assembly);
                builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
    
                //add custom class to the container as Transient instance
                builder.RegisterType<ConfigReader>().As<IConfigReader>();
                builder.RegisterType<WebSession>().As<IWebSession>();
                builder.RegisterType<BlogInfoBuilder>().As<IBlogInfoBuilder>();
    
                builder.RegisterModule(new AutofacWebTypesModule());
    
                return builder.Build();
            }
    
            #endregion
        }
    }
    

    This didn't fix the problem either. In theory it should be correctly wired up by this bit...

    builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
    

    but it isn't. I managed to trigger it in the end but only by disabling elements of my Global.asax codebehind as follows...

    /// <summary>
    /// Custom Wiring for dependency injections.
    /// </summary>
    public class MinistrywebApplication : UmbracoApplication
    {
        protected override void OnApplicationStarted(object sender, EventArgs e)
        {
            base.OnApplicationStarted(sender, e);
    
            //GlobalConfiguration.Configuration.DependencyResolver = IocConfig.ApiResolver;
            DependencyResolver.SetResolver(IocConfig.MvcResolver);
            RouteConfig.RegisterCustomRoutes(RouteTable.Routes);
        }
    }
    

    If anyone can get the IoC Mapping that's necessary to make this work then those of us using IoC can make sure to include it so we don't have these problems. I can only assume that something in my ApiResolver is wrong compared to the default one that Umbraco uses. I had a search in github but couldn't find it.

  • Keith Jackson 183 posts 552 karma points
    Jan 14, 2015 @ 17:49
    Keith Jackson
    0

    I've managed to manually trigger the install now but I've still got the bug where the Template drop down just says [Object object]

  • Mads Krohn 211 posts 504 karma points c-trib
    Jan 14, 2015 @ 22:50
    Mads Krohn
    1

    Both the AutofacWebApiDependencyResolver and the AutofacDependencyResolver static properties will, as far as I can tell, call your BuildContainer method resulting in everything getting registered twice.

    Also, I can see that you have commented out the GlobalConfiguration.Configuration.DependencyResolver part?

    Anyways, here is an example I have used with (so far) great success on a project:

    protected void BuildContainer()
    {
        /*
        * http://issues.umbraco.org/issue/U4-4181
        */
        var builder = new ContainerBuilder();
    
        // mvc controllers
        builder.RegisterControllers(Assembly.GetExecutingAssembly());
    
        // web api controllers            
        builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
    
        // Umbraco related stuff
        builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
    
        //add custom class to the container as Transient instance            
        builder.RegisterType<ContentSearchService>().As<IContentSearchService>();
    
        var container = builder.Build();
        DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
        GlobalConfiguration.Configuration.DependencyResolver = new AutofacWebApiDependencyResolver(container);
    }
    

    And the I call the BuildContainer method here:

    protected override void OnApplicationStarted(object sender, EventArgs e)
    {
        base.OnApplicationStarted(sender, e);
        BuildContainer();
    
        ...
    }
    

    As you can see, I got the most of it from another example in a comment on a logged issue.
    I even kept the comments, as I can see you have as well :P

    Anyways, the thing here is that the container is reused for both the regular mvc stuff and the web api stuff.
    I know it's not too different from the code you use, but do try it out anyways :)

    Cheers

  • Keith Jackson 183 posts 552 karma points
    Jan 16, 2015 @ 10:58
    Keith Jackson
    0

    Hi Mads,

    Thanks for posting this.

    The commented out GlobalConfiguration.Configuration.DependencyResolver was what enabled me to trigger the Install routine. I have since re-enabled it.

    Looking through it, I think your code is doing exactly the same as mine. Both sets of code are registering everything into each dependency resolver. As the scope of the container creation (the 'builder' variable) is within the BuildContainer() method both of us create a completely new builder each time this is called.

    I think this is irrelevant however as each of us is only registering the IOC Mappings once each for each of the standard MVC and API resolvers.

    Granted the static nature of my setup may cause this potentially. It woudl be interesting to dig into this. It's quite possible that we should be splitting it three ways, binding Controllers using the MVC resolver, ApiControllers using the Api resolver and everything else for both.

    I may have a play with this when I've got some time on my hands.

  • Mads Krohn 211 posts 504 karma points c-trib
    Jan 19, 2015 @ 11:00
    Mads Krohn
    0

    Hi Keith

    Just a quick note. My code does not do exactly the same thing as yours.
    Everytime you call BuildContainer(), which is two times atm, you create a new builder object and wire that object up.

    I create only one one builder object which I share among the different resolvers.
    I just tested, and indeed, it breaks the installer, but the code is definitely not the same :)

  • Keith Jackson 183 posts 552 karma points
    Jan 19, 2015 @ 11:44
    Keith Jackson
    0

    Hi Mads,

    I don't think I'm explaining myself very well, but my question was whether the end result actually is any different? Does the builder object itself matter past the point that it's provided the mappings to the resolver as the builder has no scope beyond this. There are probably better approaches here in both regards. Either something like this (which sorts the creation of duplicate builders and will, admittedly, be slightly faster)...

    using Autofac;
    using Autofac.Integration.Mvc;
    using Autofac.Integration.WebApi;
    using Ministry.Ministryweb.Models;
    using Ministry.Ministryweb.Repositories;
    using System.Reflection;
    using Umbraco.Web;
    
    namespace Ministry.Ministryweb
    {
        public static class IocConfig
        {
            private static IContainer _iocContainerBuilder ;
            private static AutofacWebApiDependencyResolver _apiResolver;
            private static AutofacDependencyResolver _mvcResolver;
    
            /// <summary>
            /// Gets the IoC Dependency Resolver.
            /// </summary>
            public static AutofacWebApiDependencyResolver ApiResolver
            {
                get { return _apiResolver ?? (_apiResolver = new AutofacWebApiDependencyResolver(ContainerBuilder)); }
            }
    
            /// <summary>
            /// Gets the IoC Dependency Resolver.
            /// </summary>
            public static AutofacDependencyResolver MvcResolver
            {
                get { return _mvcResolver ?? (_mvcResolver = new AutofacDependencyResolver(ContainerBuilder)); }
            }
    
            #region | Private Methods |
    
            /// <summary>
            /// Gets the container builder.
            /// </summary>
            /// <value>
            /// The container builder.
            /// </value>
            private static IContainer ContainerBuilder
            {
                get { return _iocContainerBuilder ?? (_iocContainerBuilder = BuildContainer()); }
            }
    
            /// <summary>
            /// Builds the IoC container.
            /// </summary>
            private static IContainer BuildContainer()
            {
               var builder = new ContainerBuilder();
    
                //register all controllers found in the Ministry.Ministryweb assembly
                builder.RegisterControllers(typeof(MinistrywebSite).Assembly);
    
                // Register umbraco context, mvc controllers and api controllers
                builder.Register(c => UmbracoContext.Current).AsSelf();
                builder.RegisterControllers(typeof(UmbracoApplication).Assembly);
                builder.RegisterControllers(typeof(MinistrywebSite).Assembly);
                builder.RegisterControllers(Assembly.GetExecutingAssembly());
                builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
                builder.RegisterApiControllers(typeof(MinistrywebApplication).Assembly);
                builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
    
                //Register core dependencies and repos
                builder.RegisterType<ConfigReader>().As<IConfigReader>();
                builder.RegisterType<WebSession>().As<IWebSession>();
                builder.RegisterType<MinistrywebPublishedContentRepository>().As<IMinistrywebPublishedContentRepository>();
    
                // Register builder classes
                builder.RegisterType<BlogInfoBuilder>().As<IBlogInfoBuilder>();
                builder.RegisterType<NavigationBuilder>().As<INavigationBuilder>();
    
                builder.RegisterModule(new AutofacWebTypesModule());
    
                return builder.Build();
            }
    
            #endregion
        }
    }
    

    Or maybe even something using different setups for each...

    using Autofac;
    using Autofac.Integration.Mvc;
    using Autofac.Integration.WebApi;
    using Ministry.Ministryweb.Models;
    using Ministry.Ministryweb.Repositories;
    using System.Reflection;
    using Umbraco.Web;
    
    namespace Ministry.Ministryweb
    {
        public static class IocConfig
        {
            private static AutofacWebApiDependencyResolver _apiResolver;
            private static AutofacDependencyResolver _mvcResolver;
    
            /// <summary>
            /// Gets the IoC Dependency Resolver.
            /// </summary>
            public static AutofacWebApiDependencyResolver ApiResolver
            {
                get { return _apiResolver ?? (_apiResolver = new AutofacWebApiDependencyResolver(BuildApiContainer())); }
            }
    
            /// <summary>
            /// Gets the IoC Dependency Resolver.
            /// </summary>
            public static AutofacDependencyResolver MvcResolver
            {
                get { return _mvcResolver ?? (_mvcResolver = new AutofacDependencyResolver(BuildMvcContainer())); }
            }
    
            #region | Private Methods |
    
            /// <summary>
            /// Builds the IoC container.
            /// </summary>
            private static IContainer BuildApiContainer()
            {
               var builder = new ContainerBuilder();
    
                builder.Register(c => UmbracoContext.Current).AsSelf();
                builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
                builder.RegisterApiControllers(typeof(MinistrywebApplication).Assembly);
                builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
    
                builder.RegisterCoreDependencies();
    
                return builder.Build();
            }
    
            /// <summary>
            /// Builds the IoC container.
            /// </summary>
            private static IContainer BuildMvcContainer()
            {
                var builder = new ContainerBuilder();
    
                // Register umbraco context, mvc controllers and api controllers
                builder.Register(c => UmbracoContext.Current).AsSelf();
                builder.RegisterControllers(typeof(UmbracoApplication).Assembly);
                builder.RegisterControllers(typeof(MinistrywebSite).Assembly);
                builder.RegisterControllers(Assembly.GetExecutingAssembly());
    
                builder.RegisterCoreDependencies();
    
                return builder.Build();
            }
    
            /// <summary>
            /// Registers the core dependencies.
            /// </summary>
            private static void RegisterCoreDependencies(this ContainerBuilder builder)
            {
                //Register core dependencies and repos
                builder.RegisterType<ConfigReader>().As<IConfigReader>();
                builder.RegisterType<WebSession>().As<IWebSession>();
                builder.RegisterType<MinistrywebPublishedContentRepository>().As<IMinistrywebPublishedContentRepository>();
    
                // Register builder classes
                builder.RegisterType<BlogInfoBuilder>().As<IBlogInfoBuilder>();
                builder.RegisterType<NavigationBuilder>().As<INavigationBuilder>();
    
                builder.RegisterModule(new AutofacWebTypesModule());
            }
    
            #endregion
        }
    }
    

    The above, however, seems to completely bork the Umbraco backend so both resolvers seem to need all of the dependencies.

  • Mads Krohn 211 posts 504 karma points c-trib
    Jan 19, 2015 @ 12:35
    Mads Krohn
    0

    Yes, the end result seems to be the same, a broken installer.

    builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
    

    That line breaks the installer, but without it, the backend won't work, so something fishy is definitely going on.
    Not really sure what's going on though, will need some more investigation.

  • Keith Jackson 183 posts 552 karma points
    Jan 19, 2015 @ 12:41
    Keith Jackson
    0

    I can only think that the default Resolvers that Umbraco itself uses must have something a bit more involved going on at this point. It would be handy for Umbraco itself to expose an extension method for this onto ContainerBuilder, something like...

        public static RegisterUmbracoDependencies(this ContainerBuilder builder)
        {
            builder.Register(c => UmbracoContext.Current).AsSelf();
            builder.RegisterControllers(typeof(UmbracoApplication).Assembly);
            builder.RegisterApiControllers(typeof(UmbracoApplication).Assembly);
    
            // other funky stuff the default resolver needs.
        }
    
  • Mads Krohn 211 posts 504 karma points c-trib
    Jan 19, 2015 @ 12:45
    Mads Krohn
    100

    Yeah, it's very possible that there is some internal resolver config that interferes with our own custom DI stuff.

  • Keith Jackson 183 posts 552 karma points
    Jan 19, 2015 @ 12:48
    Keith Jackson
    0

    I'm marking this as fixed for now. If I remember to do so I'll add it to the YouTrack logs later.

  • Mads Krohn 211 posts 504 karma points c-trib
    Jan 19, 2015 @ 13:02
    Mads Krohn
    0

    Would be a good idea :)

Please Sign in or register to post replies

Write your reply to:

Draft